import Mock from "mockjs";
import homeApi from './mockServeData/home'
import user from './mockServeData/user'

import permission from "./mockServeData/permission";

// Mock.mock('/api/home/getData', function(){
//     // 拦截到请求后的处理逻辑
//     console.log("拦截到了")
// })
Mock.mock('/api/home/getData', homeApi.getStatisticalData)

// 用户列表数据
Mock.mock('/api/user/add', 'post', user.createUser)
Mock.mock('/api/user/edit', 'post', user.updateUser)
Mock.mock('/api/user/del', 'post', user.deleteUser)

// 决定路径 按当前路径匹配
// Mock.mock('/api/user/getUserList', user.getUserList)  
// 正则匹配
Mock.mock(/api\/user\/getUserList/, user.getUserList)  

// 定义拦截器 获取 mock 用户名密码
Mock.mock(/api\/permission\/getMenu/, 'post', permission.getMenu)